package template;

import net.java.ao.Implementation;
import net.java.ao.Entity;
import net.java.ao.ManyToMany;
import net.java.ao.OneToOne;

//defines a table to be created in database by ActiveObjects
@Implementation(CalendarHelper.class)
public interface Calendar extends Entity {
	
	//method to add event to calendar 
	public void addEvent(Event event);
	
	//method to retrieve all of the calendars events and to clear them
	@ManyToMany(value = EventsToCalendars.class)
	public Event[] getEvents();
	public void clearEvents();
	
	//method to set and get the creator of the calendar
	@OneToOne
	public Person getCreator();
	public void setCreator(Person creator);
	
	//method to get and set the name of the calendar
	public String getName();
	public void setName(String name);

}